<?php

declare(strict_types=1);

namespace App\Constants;

use Hyperf\Constants\Annotation\Constants;
use Hyperf\Constants\Annotation\Message;
use Hyperf\Constants\EnumConstantsTrait;

#[Constants]
enum ErrorCode: int
{
    use EnumConstantsTrait;

    #[Message("成功！")]
    case CODE_TYPE_SUCCESS = 0;

    #[Message("系统内部错误！")]
    case CODE_TYPE_ERROR_SYSTEM = -1;

    #[Message("登录已过期！")]
    case CODE_TYPE_ERROR_LOGIN_EXPIRE = 100;

    #[Message("缺少权限！")]
    case CODE_TYPE_ERROR_NOT_AUTH = 200;

    #[Message("文件上传错误！")]
    case CODE_TYPE_FILE_ERROR = 300;

    #[Message("文件类型错误！")]
    case CODE_TYPE_FILE_ERROR_TYPE = 301;

    #[Message("文件资源异常！")]
    case CODE_TYPE_FILE_ERROR_DOWNLOAD = 302;

}
